FROM python:3.9-slim
# 设置工作目录
WORKDIR /app

# 复制依赖文件并安装
COPY requirements.txt .
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt

# 复制项目代码
COPY . .

# 暴露服务端口
EXPOSE 8001

# 设置环境变量
ENV REDIS_HOST=localhost
ENV REDIS_PASSWORD=123456
ENV ZHIPU_API_KEY="a0859910732f46b2b429b478c0aad8da.JudnUB6f49qNrvS8"

# 启动命令
CMD ["uvicorn", "waic_backends:app", "--host", "0.0.0.0", "--port", "8001"]
#CMD ["uvicorn", "waic_demo:app", "--reload", "--port", "8001"]